import 'package:flutter/material.dart';
import 'package:flutterapp/page/home/info/index.dart';
import 'package:flutterapp/page/home/tab_index/index_navigator.dart';

import 'package:flutterapp/page/widgets/common_swipper.dart';
import 'package:flutterapp/page/widgets/search_bar/index.dart';

import 'index_recommond.dart';

class TabIndex extends StatelessWidget {
  const TabIndex({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        //centerTitle: true,
        automaticallyImplyLeading: false,
        title: SearchBarPage(
          showLoaction: true,
          showMap: true,
          onSearch: () {
            Navigator.of(context).pushNamed('search');
          },
        ),
        backgroundColor: Colors.white,
      ),
      body: ListView(
        children: [
          CommonSwipper(),
          IndexNavigator(),
          IndexRecommond(),
          InfoPage(
            showTitle: true,
          ),
          Text('内容区域.....'),
        ],
      ),
    );
  }
}
